package MOLE.BillWWW;

import MOLE.*;

/** 
 Account ��ժҪ˵����
*/
public class Account extends Bill.Account
{

	public Account(int uid)
	{
		//
		// TODO: �ڴ˴���ӹ��캯���߼�
		//
		Uid = uid;

	}


		 public final boolean Freez()
		 {
	 MOLE.App.Account a = this;
	   a.Freez();
		return true;
		 }



	public final java.math.BigDecimal GetBingoTotalMoney()
	{

		java.math.BigDecimal r = new java.math.BigDecimal(0);

		String s = "exec Account_GetBingoTotalMoney   " + this.Uid.toString();
		DataTable d = MOLE.SQL.GetDataTable(s);
		try
		{
			r = (java.math.BigDecimal)(d.Rows[0]["money"].toString());
		}
		catch (java.lang.Exception e)
		{
		}


		 return r;
	}

	public final java.math.BigDecimal GetTisyeTotalMoney()
	{


		java.math.BigDecimal r = new java.math.BigDecimal(0);

		String s = "exec  Account_GetTisyeTotalMoney   " + this.Uid.toString();
		DataTable d = MOLE.SQL.GetDataTable(s);
		try
		{
			r = (java.math.BigDecimal)(d.Rows[0]["money"].toString());
		}
		catch (java.lang.Exception e)
		{
		}


		return r;


	}

	public final java.math.BigDecimal GetPayTotalMoney()
	{
		java.math.BigDecimal r = new java.math.BigDecimal(0);
		String s = "select * from bank where hy_num=" + Uid.toString();
		DataTable d = MOLE.SQL.GetDataTable(s);
		try
		{
			r = (java.math.BigDecimal)(d.Rows[0]["output_money"].toString());
		}
		catch (java.lang.Exception e)
		{
		}

		r = GetTisyeTotalMoney().subtract(r);

		return r;
	}

}